import axios from '@/utils/request'

export const getRoleList = data => axios.get('/sys/role', {params: data})
export const getRole = id => axios.get(`/sys/role/${id}`)
export const addRole = data => axios.post('/sys/role', data)
export const editRole = data => axios.put(`/sys/role/${data.id}`, data)
export const delRole = id => axios.delete(`/sys/role/${id}`)
export const getEnableList = () => axios.get('/sys/role/list/enabled')
export const editRolePermission = data => axios.put('/sys/role/assignPrem', data)
